﻿Namespace System
    <Serializable()> _
    Public Class Tuple(Of T1)
        Public Sub New(ByVal item1 As T1)
            Me.Item1 = item1
        End Sub

        Public Property Item1 As T1

    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2)
        Inherits Tuple(Of T1)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2)
            MyBase.New(item1)
            Me.Item2 = item2
        End Sub

        Public Property Item2 As T2
    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2, T3)
        Inherits Tuple(Of T1, T2)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2, ByVal item3 As T3)
            MyBase.New(item1, item2)
            Me.Item3 = item3
        End Sub

        Public Property Item3 As T3
    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2, T3, T4)
        Inherits Tuple(Of T1, T2, T3)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2, ByVal item3 As T3, ByVal item4 As T4)
            MyBase.New(item1, item2, item3)
            Me.Item4 = item4
        End Sub

        Public Property Item4 As T4
    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2, T3, T4, T5)
        Inherits Tuple(Of T1, T2, T3, T4)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2, ByVal item3 As T3, ByVal item4 As T4, ByVal item5 As T5)
            MyBase.New(item1, item2, item3, item4)
            Me.Item5 = item5
        End Sub

        Public Property Item5 As T5
    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2, T3, T4, T5, T6)
        Inherits Tuple(Of T1, T2, T3, T4, T5)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2, ByVal item3 As T3, ByVal item4 As T4, ByVal item5 As T5, ByVal item6 As T6)
            MyBase.New(item1, item2, item3, item4, item5)
            Me.Item6 = item6
        End Sub

        Public Property Item6 As T6
    End Class

    <Serializable()> _
    Public Class Tuple(Of T1, T2, T3, T4, T5, T6, T7)
        Inherits Tuple(Of T1, T2, T3, T4, T5, T6)

        Public Sub New(ByVal item1 As T1, ByVal item2 As T2, ByVal item3 As T3, ByVal item4 As T4, ByVal item5 As T5, ByVal item6 As T6, ByVal item7 As T7)
            MyBase.New(item1, item2, item3, item4, item5, item6)
            Me.Item7 = item7
        End Sub

        Public Property Item7 As T7
    End Class
End Namespace